web3.js web3.eth.isSyncing
code:isSyncing
็พๅจใใผใใๅๆ็ถๆ
ใใฉใใใ็ขบ่ชใใๅๆใใฆใใใชใใธใงใฏใใ่ฟใใพใใ
ๅๆใใฆใใใชใใธใงใฏใใ็กใๅ ดๅใฏ false ใ่ฟใใพใใ
ๆปใๅค
Object ใพใใฏ Boolean ใ่ฟใ Promise
ใใผใใๅๆ็ถๆ
ใงใใใฐๅๆใชใใธใงใฏใใ่ฟใใพใใ
ใใใงใชใใใฐ falese ใ่ฟใใพใใ
ๅๆใชใใธใงใฏใใฎไธญ่บซใฏๆฌกใฎ้ใใงใใ
startingBlock - Number
ๅๆใๅงใพใฃใใใญใใฏ็ชๅทใงใใ
currentBlock - Number
็พๅจใใผใใๅๆใใฆใใใใญใใฏใฎใใญใใฏ็ชๅทใงใใ
highestBlock - Number
ๅๆๅ
ใฎไบๆธฌใใญใใฏ็ชๅทใงใใ
knownStates - Number
ใใฆใณใญใผใใใใใใฎไบๆธฌ็ถๆ
ใงใใ
"states" ใจใฏไฝใ๏ผhideyoshi.icon #todo pulledStates - Number
ใใงใซใใฆใณใญใผใๆธใฟใฎไบๆธฌ็ถๆ
ใงใใ
ใตใณใใซ
code:example.js
web3.eth.isSyncing()
.then(console.log);
{
startingBlock: 100,
currentBlock: 312,
highestBlock: 512,
knownStates: 234566,
pulledStates: 123455
}
ๅๆ